import { createStore } from 'vuex'
import persistedState from 'vuex-persistedstate'

let create_persistedstate = persistedState({
  key:'store',
  storege:window.localStorage
})

export default createStore({
  state: {
    userInfo:{
      account:"",
      password:""
    }
  },
  getters: {
  },
  mutations: {
    ADDACCOUNT(state, { account, password }) {
      state.userInfo.account = account;
      state.userInfo.password = password;
      return true;
    }
  },
  actions: {
  },
  modules: {
  },
  plugins: [create_persistedstate]
})
